package com.example.thai.mydemo2.SqlAdapter;

import android.content.ContentValues;
import android.graphics.Bitmap;

/**
 * 資料格式存取
 */
public class ApkEntity {
    private int id;
    private String name;
    private String address;
    private String info;
    private Bitmap image;
    private byte[] byteImag;
    private int size;
    private int intImg;

    public ApkEntity() {
        super();
    }

    public ApkEntity(int id, String name, String address) {
        super();
        this.id = id;
        this.name = name;
        this.address = address;
    }

    public ApkEntity(String name, String address, byte[] image) {
        super();
        this.name = name;
        this.address = address;
        //this.image = image;
    }

    public ApkEntity(int id, String name, String address, String info, byte[] image) {
        super();
        this.id = id;
        this.name = name;
        this.address = address;
        this.info = info;
        //this.image = image;
    }

    public int getSize()
    {
        return size;
    }
    public void setSize(int size)
    {
        this.size = size;
    }

    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }

    public String getInfo() {
        return info;
    }
    public void setInfo(String info) {
        this.info = info;
    }

    public Bitmap getImage() {
        return image;
    }
    public void setImage(Bitmap image) {
        this.image = image;
    }

    public int getIntImg() {
        return intImg;
    }

    public void setIntImg(int intImg) {
        this.intImg = intImg;
    }

    public byte[] getByteImag() {
        return byteImag;
    }

    public void setByteImag(byte[] byteImag) {
        this.byteImag = byteImag;
    }

    public ContentValues toContentValues() {
        ContentValues data = new ContentValues();
//		data.put("ID", this.id);// 這個不需要，因為database會自動建立
        data.put("NAME", this.name);
        data.put("ADDRESS", this.info);
        //data.put("INFO", this.info);
        data.put("PICTURE", this.byteImag);
        return data;
    }

}
